import * as echarts from '../../components/ec-canvas/echarts.js';

let chart = null;

function initChart(canvas, width, height, dpr) {
  chart = echarts.init(canvas, null, {
    width: width,
    height: height,
    
    devicePixelRatio: dpr // new
  });
  canvas.setChart(chart);

  var option = {
    title: {
      text: '各阶段填报情况',
      left:'30%'
    },
      yAxis: {
        inverse:true,
        data: ['注册', '信息', '资料', '日志','鉴定' ],
       
      },
      xAxis: {
      },
      series: [
        {
          realtimeSort :true,
          type: 'bar',
          data: [2, 4, 1, '15','1']
        }
      ]
    
  };

  chart.setOption(option);
  return chart;
}

Page({
 
  data: {
    ec: {
      onInit: initChart
    }
  },


});
